﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace GraphicalSVN.WPFApp
{
    /// <summary>
    /// Interaction logic for Display.xaml
    /// </summary>
    public partial class Display : Window
    {

        private Generator current;
        private readonly GameLoop gameLoop = new GameLoop();
        public Display()
        {
            InitializeComponent();
            fps.SetGameLoop(gameLoop);
            Loaded += OnLoaded;
        }

        private void OnLoaded(object sender, RoutedEventArgs args)
        {
            gameLoop.Start();

            current = (Generator)Activator.CreateInstance(typeof(Generator));
            physicsContainer.Content = current;
            current.SetGameLoop(gameLoop);
            current.SetCurrentIdentity(identity);
            current.SetCurrentDate(date);
        }
    }
}
